package dao

import (
	"petCombo-srv/global"
	"petCombo-srv/internal/model"
	__ "petCombo-srv/proto"
)

type PetImpl interface {
	PetList(petId int) []*__.PetList
}
type PetListService struct {
}

func NewPetListService() *PetListService {
	return &PetListService{}
}
func (p *PetListService) PetList(petId int) []*__.PetList {

	var pet model.Pets

	List := pet.PetList(global.DB, petId)

	return List

}

func (p *PetListService) PetAdd(pet model.Pets) uint {
	var pets model.Pets
	pets = model.Pets{
		Name:                   pet.Name,
		Gender:                 pet.Gender,
		PetId:                  pet.PetId,
		SterilizationSituation: pet.SterilizationSituation,
		VaccineSituation:       pet.VaccineSituation,
		DewormingSituation:     pet.DewormingSituation,
	}

	err := pets.PetAdd(global.DB)
	if err != nil {
		return 0
	}

	return pets.ID
}
